<template>
<!-- $attrs传人内部组件 -->
    <div>
        <h1>C component!!``````{{$attrs}}-----{{myname}}---{{$store.state.username}}</h1>
        <button @click="bus">c按钮</button>
    </div>
</template>

<script>
import MyEvent from "./MyEvent"
    export default{
       inject:["myname"],
        data(){
            return{
                
            }
        },
        components:{

        },
        methods:{
          bus(){
              MyEvent.$emit("CBus","C数据")
          }
        }
    }
</script>

<style>
</style>